package com.gdust.gkyx.activity.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gdust.gkyx.model.activity.ActivityInfo;
import com.gdust.gkyx.model.activity.ActivityRule;
import com.gdust.gkyx.model.activity.ActivitySku;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * ClassName: ActivityInfoMapper
 * Package: com.gdust.gkyx.activity.mapper
 * Description:
 *
 * @Author syun
 * @Create 2025/1/26 16:12
 * @Version 1.0
 */
public interface ActivityInfoMapper extends BaseMapper<ActivityInfo> {
    /**
     * // 如果之前参加过，活动正在进行中，排除商品
     * @param skuIdList
     * @return
     */
    List<Long> selectSkuIdListExist(@Param("skuIdList") List<Long> skuIdList);

    //根据所有skuId列表获取参与活动
    List<ActivitySku> selectCartActivity(@Param("skuIdList") List<Long> skuIdList);

    //根据skuId进行查询，查询sku对应活动里面规则列表
    List<ActivityRule> findActivityRule(@Param("skuId") Long skuId);
}
